Neodymium- or erbium-doped silica films are deposited on single crystal silicon substrates using a sol-gel process and a spin-coating technique. These glasses are doped with neodymium or erbium in various Nd/Si or Er/Si atomic ratios up to 8% using neodymium nitrate or erbium nitrate as precursor. A preparation method of such films is described. Film rare earth concentration measured by Rutherford Backscattering Spectroscopy (RBS) is the same as in the initial liquid solution. Film thickness and refractive index are obtained by variable angle spectroscopic ellipsometry. We have shown that both RBS analysis and spectroscopic ellipsometry are powerful tools to control rare earth doping level and optical properties of the silica films.